import React from "react";
import { useState } from "react";

export default function App() {
  const [count, setCount] = useState(100);
  return (
    <div>
      <h1>REACT计数器{count}</h1>
      <div>
        <button
          onClick={() => {
            setCount(count + 1);
          }}
        >
          +1
        </button>
        <button
          onClick={() => {
            setCount(count - 1);
          }}
        >
          -1
        </button>
      </div>
    </div>
  );
}
